// 定义详情模块数据ts类型
export interface ResponsData {
    code: number;
    message: string;
    ok: boolean;
}

// 代表医院详情的数据
export interface HospitalDetail {
    bookingRule: {
        cycle: number;
        releaseTime: string;
        stopTime: string;
        quitDay: number;
        quitTime: string;
        rule: string[];
    };
    hospital: {
        id: string;
        createTime: string;
        updateTime: string;
        isDeleted: 0;
        param: {
            hostypeString: string;
            fullAddress: string;
        };
        hoscode: string;
        hosname: string;
        hostype: string;
        provinceCode: string;
        cityCode: string;
        districtCode: string;
        address: string;
        logoData: string;
        intro: string;
        route: string;
        status: number;
        bookingRule: null;
    };
}

// 医院详情返回数据ts
export interface HospitalDetailData extends ResponsData {
    data: HospitalDetail;
}

// #region 医院科室数据ts
// 某一医院科室的数据
export interface Department {
    depcode: string;
    depname: string;
    children?: Department[];
}
// 代表存储科室数据的类型
export type DeparmentArr = Department[];
// 获取科室接口返回的数据类型
export interface DepartmentResponseData extends ResponsData {
    data: DeparmentArr;
}
// #endregion 医院科室数据ts

// #region 用户登录接口需要携带参数的类型
export interface LoginData {
    phone: string;
    code: string;
}

// 登录接口返回的用户信息数据
export interface UserInfo {
    name: string;
    token: string;
}

// 登录接口返回数据的ts类型
export interface UserLoginResponseData extends ResponsData {
    data: UserInfo;
}
// #endregion

// 定义微信扫码登录返回得数据ts类型
export interface WXLogin {
    redirectUri: string;
    appid: string;
    scope: string;
    state: string;
}
export interface WXLoginResponseData extends ResponsData {
    data: WXLogin;
}

// 获取某一医院某一科室预约挂号的数据类型
export interface BaseMap {
    workDateString: string;
    releaseTime: string;
    bigname: string;
    stopTime: string;
    depname: string;
    hosname: string;
}
export interface WorkData {
    workDate: string;
    workDateMd: string;
    dayOfWeek: string;
    docCount: number;
    reservedNumber: null;
    availableNumber: number;
    status: number;
}
export type BokingScheduleList = WorkData[];
export interface HopitalWordData extends ResponsData {
    data: {
        total: number;
        bookingScheduleList: BokingScheduleList;
        baseMap: BaseMap;
    };
}

//代表一个医生的数据
export interface Doctor {
    id: string;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: {
        dayOfWeek: string;
        depname: string;
        hosname: string;
    };
    hoscode: string;
    depcode: string;
    title: string;
    docname: string;
    skill: string;
    workDate: string;
    workTime: number;
    reservedNumber: number;
    availableNumber: number;
    amount: number;
    status: number;
    hosScheduleId: string;
}
// 数组包含全部医生
export type DoctorArr = Doctor[];
// 获取排班医生接口返回的数据
export interface DoctorResponseData extends ResponsData {
    data: DoctorArr;
}

// 就诊人的ts类型
export interface User {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: {
        certificatesTypeString: string;
        contactsCertificatesTypeString: string;
        cityString: null;
        fullAddress: string;
        districtString: null;
        provinceString: null;
    };
    userId: number;
    name: string;
    certificatesType: string;
    certificatesNo: string;
    sex: number;
    birthdate: string;
    phone: string;
    isMarry: number;
    provinceCode: null;
    cityCode: null;
    districtCode: null;
    address: string;
    contactsName: string;
    contactsCertificatesType: string;
    contactsCertificatesNo: string;
    contactsPhone: string;
    isInsure: number;
    cardNo: null;
    status: string;
}
export type UserArr = User[];
export interface UserResponseData extends ResponsData {
    data: UserArr
}


// 挂号医生的ts类型
export interface RegisterDoctor {
    "id": string,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
        "dayOfWeek": string,
        "depname": string,
        "hosname": string
    },
    "hoscode": string,
    "depcode": string,
    "title": string,
    "docname": string,
    "skill": string,
    "workDate": string,
    "workTime": number,
    "reservedNumber": number,
    "availableNumber": number,
    "amount": number,
    "status": number,
    "hosScheduleId": string
}
export interface RegisterDoctorResponseData extends ResponsData {
    data: RegisterDoctor
}